package com.controller.qsl;

import com.bean.qsl.User;
import com.bean.qsl.YuYdInfo;
import com.bean.qsl.YyFwInfo;
import com.dao.qsl.FuWuYd;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
public class GetYuYue {
      @Autowired
      private FuWuYd f;

      /**
       * 小区服务
       * @return
       */
      @RequestMapping("/QslPage/yuyueinfo")
      @ResponseBody
      public List<YuYdInfo> fwyd(HttpServletRequest request){

	  return  f.fwyd(request);
      }

      /**
       * 小区活动
       * @return
       */
      @RequestMapping("/QslPage/yuyuehd1")
      @ResponseBody
      public List<YuYdInfo> hdyd(HttpServletRequest request){

            return  f.hdyd(request);
      }

      /**
       * 小区服务预定
       */
      @RequestMapping("/QslPage/tjfwyd")
      @ResponseBody
      public  Boolean hdfuyd(Integer id, String ly, HttpServletRequest request){

            return  f.addfwyd(id,ly,request);
      }

      /**
       * 添加小区活动预定
       */
      @RequestMapping("/QslPage/tjhdyd1")
      @ResponseBody
      public  Boolean  xqhdyd(int id,HttpServletRequest request){

            return  f.addhdyd(id,request);
      }

      /**
       * 查看预约信息
       */
      @RequestMapping("/ckyyxx")
      @ResponseBody
      public  List<YyFwInfo> ckyyfw(){

            return f.ck();
      }

      /**
       * 查看预约信息
       */
      @RequestMapping("/ckhdxx")
      @ResponseBody
      public  List<YyFwInfo> ckhd(){

            return f.ckhd();
      }

      /**
       * 业主查看已预约的服务
       */
      @RequestMapping("/QslPage/yzckyyfw")
      @ResponseBody
      public  List<String> yzckhd(HttpServletRequest request){

            return f.selectyyfw(request);
      }

      /**
       * 预约成功添加预定人数
       */
      @RequestMapping("/QslPage/tjydrs1")
      @ResponseBody
      public  Boolean tjydrs(int id){

            return  f.tjydrs(id);
      }

      /**
       * 预约的服务信息退订
       */
      @RequestMapping("/QslPage/quxiaoyd")
      @ResponseBody
      public Boolean tuid(String yyname,HttpServletRequest request){

            return  f.tuiding(yyname,request);
      }

      /**
       * 判断登入人
       */
      @RequestMapping("/QslPage/ifdr")
      @ResponseBody
      public List<User> ifdr (HttpServletRequest request){
           return   f.ifyzwy(request);
      }

      /**
       * 查看活动预约信息
       */
      @RequestMapping("/QslPage/selecthdxx")
      @ResponseBody
      public List<String> selecthdxx(HttpServletRequest request){


            return  f.selecthdxx(request);
      }

      /**
       * 预约的活动信息退订
       */
      @RequestMapping("/QslPage/quxiaohdyd")
      @ResponseBody
      public Boolean tuidhd(String yyname,HttpServletRequest request){

            return  f.quxhdyd(yyname,request);
      }
}
